const fakeApi = (name) =>
    new Promise((resolve, reject) =>
        setTimeout(
            () => resolve(new Array(10).fill(undefined).map((n, i) => `${name}${i}`)),
            1000
        )
    );

const fetchCounties = async(cityName) => {
    const counties = await fakeApi(`${cityName} - 县`);
    return counties;
};

const fetchCities = async(provinceName) => {
    const cities = await fakeApi(`${provinceName} - 市`);
    return cities;
};

const fetchProvinces = async() => {
    const provinces = await fakeApi(`省`);
    return provinces;
};

const fetch = async() => {
    const result = [];
    const provinces = await fetchProvinces();
    await Promise.all(
        provinces.map((p) =>
            fetchCities(p).then((cities) =>
                Promise.all(
                    cities.map((city) =>
                        fetchCounties(city).then((countries) => result.push(...countries))
                    )
                )
            )
        )
    );

    console.log(result);
};

fakeApi("test").then(console.log);
fetch();